<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // \d 数字  \m 数字字母下划线  . 除了换行符以外
        let name="dfeasfwe45639(-=#$%#$%\n\t";
        console.log(name.match(/.+/g));// ['dfeasfwe45639(-=#$%#$%', '\t']
        
        //[]作用是取里面出现的元素 [\.\d....]
        //取全部元素
        //[\d\D] 前面表示数字，后面表示除了数字，加在一起就表示所有字符
        let web=`
        <span>
            sasuhkjdhwa
            feasfse
        </span>
        `;
        console.log(web.match(/<span>[\d\D]+<\/span>/g));
            //['<span>\n            sasuhkjdhwa\n            feasfse\n        </span>']
            //用.的形式 s表示单行查询
            console.log(web.match(/<span>.+<\/span>/sg));
                //['<span>\n            sasuhkjdhwa\n            feasfse\n        </span>']

    </script>
</body>
</html>